      module mo_prod_loss
      use shr_kind_mod, only : r8 => shr_kind_r8
      private
      public :: exp_prod_loss
      public :: imp_prod_loss
      contains
      subroutine exp_prod_loss( prod, loss, y, rxt, het_rates )
      use ppgrid, only : pver
      implicit none
!--------------------------------------------------------------------
! ... dummy args
!--------------------------------------------------------------------
      real(r8), dimension(:,:,:), intent(out) :: &
            prod, &
            loss
      real(r8), intent(in) :: y(:,:,:)
      real(r8), intent(in) :: rxt(:,:,:)
      real(r8), intent(in) :: het_rates(:,:,:)
!--------------------------------------------------------------------
! ... loss and production for Explicit method
!--------------------------------------------------------------------
         loss(:,:,1) = (rxt(:,:,73)* y(:,:,3) +rxt(:,:,72)* y(:,:,12) &
                  + het_rates(:,:,15))* y(:,:,15)
         prod(:,:,1) = 0._r8
         loss(:,:,2) = ((rxt(:,:,57) +rxt(:,:,58))* y(:,:,3) + rxt(:,:,4) &
                  + het_rates(:,:,4))* y(:,:,4)
         prod(:,:,2) = 0._r8
         loss(:,:,3) = ((rxt(:,:,81) +rxt(:,:,82))* y(:,:,12) + het_rates(:,:,16)) &
                 * y(:,:,16)
         prod(:,:,3) = 0._r8
         loss(:,:,4) = ( + rxt(:,:,199) + het_rates(:,:,97))* y(:,:,97)
         prod(:,:,4) = 0._r8
         loss(:,:,5) = ( + het_rates(:,:,98))* y(:,:,98)
         prod(:,:,5) =rxt(:,:,199)*y(:,:,97)
         loss(:,:,6) = (rxt(:,:,46)* y(:,:,3) +rxt(:,:,47)* y(:,:,12) &
                  + het_rates(:,:,11))* y(:,:,11)
         prod(:,:,6) =.050_r8*rxt(:,:,73)*y(:,:,15)*y(:,:,3)
         loss(:,:,7) = (rxt(:,:,211)* y(:,:,12) + het_rates(:,:,99))* y(:,:,99)
         prod(:,:,7) = 0._r8
         loss(:,:,8) = (rxt(:,:,212)* y(:,:,12) + het_rates(:,:,100))* y(:,:,100)
         prod(:,:,8) = 0._r8
      end subroutine exp_prod_loss
      subroutine imp_prod_loss( prod, loss, y, rxt, het_rates )
      use ppgrid, only : pver
      implicit none
!--------------------------------------------------------------------
! ... dummy args
!--------------------------------------------------------------------
      real(r8), dimension(:), intent(out) :: &
            prod, &
            loss
      real(r8), intent(in) :: y(:)
      real(r8), intent(in) :: rxt(:)
      real(r8), intent(in) :: het_rates(:)
!--------------------------------------------------------------------
! ... loss and production for Implicit method
!--------------------------------------------------------------------
         loss(91) = (rxt(42)* y(2) +rxt(60)* y(5) +rxt(62)* y(6) +rxt(50)* y(12) &
                  +rxt(51)* y(13) +rxt(91)* y(22) +rxt(116)* y(33) +rxt(147)* y(50) &
                  +rxt(159)* y(53) +rxt(161)* y(54) +rxt(194)* y(63) + rxt(2) + rxt(3) &
                  + het_rates(1))* y(1)
         prod(91) = (.100_r8*rxt(147)*y(50) +.200_r8*rxt(159)*y(53) + &
                 .200_r8*rxt(161)*y(54))*y(1) + (.890_r8*rxt(8) +.890_r8*rxt(9))*y(7) &
                  + (.250_r8*rxt(105)*y(31) +.250_r8*rxt(171)*y(57))*y(13) +rxt(41) &
                 *y(2)
         loss(30) = ((rxt(57) +rxt(58))* y(4) +rxt(46)* y(11) +rxt(73)* y(15) &
                  + rxt(43) + rxt(44) + rxt(45) + het_rates(3))* y(3)
         prod(30) =rxt(2)*y(1)
         loss(59) = (rxt(42)* y(1) +rxt(61)* y(6) +rxt(48)* y(12) +rxt(49)* y(13) &
                  + rxt(41) + het_rates(2))* y(2)
         prod(59) = (rxt(43) +rxt(44))*y(3) +rxt(3)*y(1) +rxt(5)*y(6) +rxt(55)*y(12) &
                 *y(12)
         loss(88) = (rxt(60)* y(1) +rxt(68)* y(7) +rxt(59)* y(13) +rxt(74)* y(17) &
                  +rxt(92)* y(24) +rxt(96)* y(28) +rxt(103)* y(31) +rxt(122)* y(35) &
                  +rxt(118)* y(37) +rxt(127)* y(40) +rxt(136)* y(43) +rxt(138)* y(45) &
                  +rxt(143)* y(48) +rxt(148)* y(51) + (rxt(162) +rxt(163))* y(55) &
                  +rxt(169)* y(57) +rxt(180)* y(61) +rxt(196)* y(64) +rxt(190)* y(68) &
                  +rxt(155)* y(76) +rxt(87)* y(103) + het_rates(5))* y(5)
         prod(88) = (rxt(5) +.500_r8*rxt(202) +rxt(61)*y(2))*y(6) + (.110_r8*rxt(8) + &
                 .110_r8*rxt(9))*y(7) +2.000_r8*rxt(58)*y(4)*y(3)
         loss(93) = (rxt(62)* y(1) +rxt(61)* y(2) +rxt(64)* y(7) +rxt(66)* y(12) &
                  +rxt(69)* y(13) +rxt(104)* y(31) +rxt(175)* y(57) +rxt(189)* y(70) &
                  + rxt(5) + rxt(202) + het_rates(6))* y(6)
         prod(93) = (rxt(59)*y(13) +rxt(60)*y(1) +2.000_r8*rxt(68)*y(7) + &
                 rxt(74)*y(17) +rxt(87)*y(103) +rxt(92)*y(24) +rxt(96)*y(28) + &
                 rxt(103)*y(31) +rxt(118)*y(37) +rxt(122)*y(35) +rxt(127)*y(40) + &
                 rxt(136)*y(43) +rxt(138)*y(45) +.900_r8*rxt(143)*y(48) + &
                 .920_r8*rxt(148)*y(51) +1.206_r8*rxt(155)*y(76) +rxt(162)*y(55) + &
                 rxt(169)*y(57) +rxt(180)*y(61) +.900_r8*rxt(190)*y(68) + &
                 rxt(196)*y(64))*y(5) + (.890_r8*rxt(8) +.890_r8*rxt(9) + &
                 rxt(63)*y(13) +rxt(149)*y(51) +1.206_r8*rxt(156)*y(76) + &
                 rxt(164)*y(55) +rxt(170)*y(57) +rxt(178)*y(77) +rxt(181)*y(61) + &
                 rxt(195)*y(63))*y(7) + (.660_r8*rxt(10) +.660_r8*rxt(11) +rxt(71) + &
                 rxt(70)*y(12))*y(9) + (rxt(6) +rxt(65))*y(10) + (rxt(131)*y(74) + &
                 .400_r8*rxt(177)*y(77))*y(12) + (.600_r8*rxt(19) +rxt(109))*y(73) &
                  + (rxt(20) +rxt(176))*y(75) +.700_r8*rxt(189)*y(70)*y(6) +rxt(7) &
                 *y(8) +.206_r8*rxt(157)*y(76)*y(13) +rxt(30)*y(77)
         loss(94) = (rxt(68)* y(5) +rxt(64)* y(6) +rxt(63)* y(13) +rxt(79)* y(19) &
                  +rxt(102)* y(30) +rxt(117)* y(33) +rxt(154)* y(50) +rxt(149)* y(51) &
                  +rxt(164)* y(55) +rxt(170)* y(57) +rxt(133)* y(60) +rxt(181)* y(61) &
                  +rxt(195)* y(63) +rxt(156)* y(76) +rxt(178)* y(77) +rxt(207)* y(84) &
                  + rxt(8) + rxt(9) + rxt(201) + het_rates(7))* y(7)
         prod(94) = (rxt(67)*y(8) +rxt(108)*y(73) +.500_r8*rxt(141)*y(75))*y(12) &
                  + (.330_r8*rxt(10) +.330_r8*rxt(11))*y(9) + (rxt(6) +rxt(65))*y(10) &
                  +rxt(62)*y(6)*y(1) +.400_r8*rxt(19)*y(73)
         loss(58) = (rxt(67)* y(12) + rxt(7) + het_rates(8))* y(8)
         prod(58) = (rxt(201) +rxt(79)*y(19) +rxt(102)*y(30) +rxt(133)*y(60) + &
                 rxt(207)*y(84))*y(7) + (.500_r8*rxt(202) +rxt(66)*y(12))*y(6) &
                  +2.000_r8*rxt(200)*y(10)
         loss(41) = (rxt(70)* y(12) + rxt(10) + rxt(11) + rxt(71) + het_rates(9)) &
                 * y(9)
         prod(41) =rxt(69)*y(13)*y(6)
         loss(31) = ( + rxt(6) + rxt(65) + rxt(200) + het_rates(10))* y(10)
         prod(31) =rxt(64)*y(7)*y(6)
         loss(89) = (rxt(50)* y(1) +rxt(48)* y(2) +rxt(66)* y(6) +rxt(67)* y(8) &
                  +rxt(70)* y(9) +rxt(47)* y(11) + 2._r8*(rxt(55) +rxt(56))* y(12) &
                  +rxt(54)* y(13) +rxt(53)* y(14) +rxt(72)* y(15) + (rxt(81) +rxt(82)) &
                 * y(16) +rxt(78)* y(18) +rxt(80)* y(19) +rxt(83)* y(20) +rxt(114) &
                 * y(21) +rxt(90)* y(22) +rxt(113)* y(25) +rxt(111)* y(26) +rxt(95) &
                 * y(27) +rxt(100)* y(29) +rxt(101)* y(30) +rxt(107)* y(32) +rxt(115) &
                 * y(33) +rxt(121)* y(34) +rxt(125)* y(36) +rxt(120)* y(38) +rxt(126) &
                 * y(39) +rxt(130)* y(41) +rxt(135)* y(42) +rxt(137)* y(44) +rxt(140) &
                 * y(46) +rxt(142)* y(47) +rxt(145)* y(49) +rxt(146)* y(50) +rxt(151) &
                 * y(52) +rxt(158)* y(53) +rxt(160)* y(54) +rxt(168)* y(56) +rxt(179) &
                 * y(58) +rxt(134)* y(59) +rxt(132)* y(60) +rxt(185)* y(62) +rxt(193) &
                 * y(63) +rxt(198)* y(65) +rxt(187)* y(66) +rxt(188)* y(67) +rxt(192) &
                 * y(69) +rxt(112)* y(72) +rxt(108)* y(73) +rxt(131)* y(74) +rxt(141) &
                 * y(75) +rxt(177)* y(77) +rxt(204)* y(83) + (rxt(205) +rxt(206)) &
                 * y(84) +rxt(208)* y(86) +rxt(211)* y(99) +rxt(212)* y(100) +rxt(89) &
                 * y(101) +rxt(84)* y(102) + het_rates(12))* y(12)
         prod(89) = (rxt(51)*y(13) +.120_r8*rxt(91)*y(22) +.330_r8*rxt(116)*y(33) + &
                 .270_r8*rxt(147)*y(50) +.080_r8*rxt(159)*y(53) + &
                 .215_r8*rxt(161)*y(54) +.700_r8*rxt(194)*y(63))*y(1) &
                  + (.300_r8*rxt(78)*y(18) +.650_r8*rxt(89)*y(101) + &
                 .500_r8*rxt(100)*y(29) +.500_r8*rxt(120)*y(38) + &
                 .100_r8*rxt(168)*y(56))*y(12) + (2.000_r8*rxt(45) +rxt(46)*y(11) + &
                 .750_r8*rxt(73)*y(15))*y(3) + (rxt(49)*y(2) +rxt(59)*y(5) + &
                 rxt(63)*y(7))*y(13) + (.330_r8*rxt(10) +.330_r8*rxt(11))*y(9) &
                  + (.330_r8*rxt(21) +.330_r8*rxt(22))*y(54) +.500_r8*rxt(202)*y(6) &
                  +rxt(7)*y(8) +2.000_r8*rxt(15)*y(14) +rxt(12)*y(18) +rxt(24)*y(29) &
                  +rxt(18)*y(32) +rxt(25)*y(36) +rxt(17)*y(38) +rxt(26)*y(41) +rxt(38) &
                 *y(46) +rxt(37)*y(49) +rxt(29)*y(62) +rxt(40)*y(65) +rxt(39)*y(69)
         loss(90) = (rxt(51)* y(1) +rxt(49)* y(2) +rxt(59)* y(5) +rxt(69)* y(6) &
                  +rxt(63)* y(7) +rxt(54)* y(12) + 2._r8*rxt(52)* y(13) +rxt(77) &
                 * y(17) +rxt(85)* y(19) +rxt(97)* y(28) +rxt(105)* y(31) +rxt(123) &
                 * y(35) +rxt(119)* y(37) +rxt(128)* y(40) +rxt(139)* y(45) +rxt(144) &
                 * y(48) +rxt(150)* y(51) +rxt(165)* y(55) +rxt(171)* y(57) +rxt(182) &
                 * y(61) +rxt(197)* y(64) +rxt(191)* y(68) +rxt(157)* y(76) +rxt(88) &
                 * y(103) + rxt(210) + het_rates(13))* y(13)
         prod(90) = (rxt(47)*y(11) +rxt(81)*y(16) +rxt(82)*y(16) +rxt(211)*y(99) + &
                 rxt(212)*y(100) +rxt(48)*y(2) +rxt(50)*y(1) +rxt(53)*y(14) + &
                 rxt(80)*y(19) +rxt(83)*y(20) +rxt(84)*y(102) + &
                 .350_r8*rxt(89)*y(101) +.250_r8*rxt(90)*y(22) +rxt(111)*y(26) + &
                 rxt(112)*y(72) +rxt(114)*y(21) +rxt(134)*y(59) + &
                 .500_r8*rxt(141)*y(75) +.200_r8*rxt(168)*y(56) +rxt(177)*y(77) + &
                 .250_r8*rxt(187)*y(66) +.500_r8*rxt(206)*y(84))*y(12) &
                  + (rxt(74)*y(17) +rxt(87)*y(103) +rxt(96)*y(28) +rxt(118)*y(37) + &
                 rxt(122)*y(35) +rxt(136)*y(43) +.900_r8*rxt(143)*y(48) + &
                 rxt(148)*y(51) +.794_r8*rxt(155)*y(76) +.470_r8*rxt(162)*y(55) + &
                 rxt(180)*y(61) +.900_r8*rxt(190)*y(68) +rxt(196)*y(64))*y(5) &
                  + (2.000_r8*rxt(75)*y(17) +rxt(98)*y(28) +.900_r8*rxt(106)*y(31) + &
                 rxt(124)*y(35) +.300_r8*rxt(129)*y(40) +rxt(152)*y(51) + &
                 .730_r8*rxt(166)*y(55) +rxt(172)*y(57) +.800_r8*rxt(183)*y(61))*y(17) &
                  + (.120_r8*rxt(91)*y(22) +.190_r8*rxt(116)*y(33) + &
                 .060_r8*rxt(147)*y(50) +.060_r8*rxt(159)*y(53) + &
                 .275_r8*rxt(161)*y(54) +rxt(194)*y(63))*y(1) + (rxt(79)*y(19) + &
                 rxt(149)*y(51) +.794_r8*rxt(156)*y(76) +.470_r8*rxt(164)*y(55) + &
                 rxt(178)*y(77) +rxt(181)*y(61))*y(7) + (.660_r8*rxt(10) + &
                 .660_r8*rxt(11) +rxt(71))*y(9) + (rxt(153)*y(51) + &
                 .470_r8*rxt(167)*y(55) +rxt(184)*y(61))*y(31) + (rxt(46)*y(11) + &
                 .400_r8*rxt(73)*y(15))*y(3) + (rxt(93) +rxt(94))*y(23) &
                  + (.670_r8*rxt(21) +.670_r8*rxt(22))*y(54) +.700_r8*rxt(189)*y(70) &
                 *y(6) +.794_r8*rxt(157)*y(76)*y(13) +rxt(12)*y(18) +2.000_r8*rxt(13) &
                 *y(19) +2.000_r8*rxt(33)*y(26) +1.200_r8*rxt(99)*y(28)*y(28) +rxt(24) &
                 *y(29) +rxt(16)*y(30) +rxt(25)*y(36) +rxt(17)*y(38) +.900_r8*rxt(37) &
                 *y(49) +rxt(31)*y(52) +rxt(32)*y(59) +rxt(28)*y(60) +rxt(40)*y(65) &
                  +.560_r8*rxt(35)*y(71) +2.000_r8*rxt(36)*y(72) +rxt(30)*y(77) &
                  +rxt(86)*y(103)
         loss(26) = (rxt(53)* y(12) + rxt(15) + het_rates(14))* y(14)
         prod(26) = (.500_r8*rxt(210) +rxt(52)*y(13))*y(13) +rxt(56)*y(12)*y(12)
         loss(92) = (rxt(74)* y(5) +rxt(77)* y(13) + 2._r8*(rxt(75) +rxt(76))* y(17) &
                  +rxt(98)* y(28) +rxt(106)* y(31) +rxt(124)* y(35) +rxt(129)* y(40) &
                  +rxt(152)* y(51) +rxt(166)* y(55) +rxt(172)* y(57) +rxt(183)* y(61) &
                  + het_rates(17))* y(17)
         prod(92) = (rxt(103)*y(5) +.900_r8*rxt(106)*y(17) +2.000_r8*rxt(110)*y(31) + &
                 rxt(153)*y(51) +rxt(167)*y(55) +rxt(173)*y(57) +rxt(184)*y(61))*y(31) &
                  + (rxt(72)*y(15) +.700_r8*rxt(78)*y(18) +rxt(113)*y(25))*y(12) &
                  +.310_r8*rxt(116)*y(33)*y(1) +.750_r8*rxt(73)*y(15)*y(3) +rxt(16) &
                 *y(30) +rxt(18)*y(32) +rxt(27)*y(39) +.300_r8*rxt(23)*y(53) &
                  +.400_r8*rxt(19)*y(73)
         loss(43) = (rxt(78)* y(12) + rxt(12) + het_rates(18))* y(18)
         prod(43) =rxt(77)*y(17)*y(13)
         loss(82) = (rxt(79)* y(7) +rxt(80)* y(12) +rxt(85)* y(13) + rxt(13) + rxt(14) &
                  + het_rates(19))* y(19)
         prod(82) = (rxt(74)*y(5) +2.000_r8*rxt(75)*y(17) +rxt(76)*y(17) + &
                 .700_r8*rxt(98)*y(28) +rxt(106)*y(31) +rxt(124)*y(35) + &
                 .800_r8*rxt(129)*y(40) +1.200_r8*rxt(152)*y(51) + &
                 .880_r8*rxt(166)*y(55) +2.000_r8*rxt(172)*y(57) + &
                 .700_r8*rxt(183)*y(61))*y(17) + (rxt(118)*y(37) +rxt(127)*y(40) + &
                 .500_r8*rxt(136)*y(43) +.100_r8*rxt(143)*y(48) + &
                 .550_r8*rxt(148)*y(51) +.072_r8*rxt(155)*y(76) + &
                 .250_r8*rxt(162)*y(55) +rxt(169)*y(57))*y(5) &
                  + (.300_r8*rxt(78)*y(18) +rxt(83)*y(20) +.500_r8*rxt(90)*y(22) + &
                 .500_r8*rxt(107)*y(32) +rxt(108)*y(73) +.800_r8*rxt(111)*y(26) + &
                 .500_r8*rxt(141)*y(75))*y(12) + (rxt(91)*y(22) + &
                 .540_r8*rxt(116)*y(33) +.600_r8*rxt(147)*y(50) + &
                 .800_r8*rxt(159)*y(53) +.700_r8*rxt(161)*y(54))*y(1) &
                  + (.600_r8*rxt(149)*y(51) +.072_r8*rxt(156)*y(76) + &
                 .250_r8*rxt(164)*y(55) +rxt(170)*y(57))*y(7) &
                  + (.600_r8*rxt(153)*y(51) +.250_r8*rxt(167)*y(55) +rxt(173)*y(57)) &
                 *y(31) + (.670_r8*rxt(21) +.670_r8*rxt(22))*y(54) &
                  +.250_r8*rxt(73)*y(15)*y(3) +.008_r8*rxt(157)*y(76)*y(13) +rxt(12) &
                 *y(18) +2.000_r8*rxt(94)*y(23) +rxt(33)*y(26) +rxt(17)*y(38) +rxt(26) &
                 *y(41) +.100_r8*rxt(37)*y(49) +.690_r8*rxt(31)*y(52) &
                  +2.000_r8*rxt(174)*y(57)*y(57) +rxt(32)*y(59) +rxt(30)*y(77) &
                  +rxt(86)*y(103)
         loss(62) = (rxt(83)* y(12) + het_rates(20))* y(20)
         prod(62) = (rxt(76)*y(17) +.300_r8*rxt(98)*y(28) +.500_r8*rxt(129)*y(40) + &
                 .250_r8*rxt(152)*y(51) +.250_r8*rxt(166)*y(55) + &
                 .300_r8*rxt(183)*y(61))*y(17)
         loss(33) = (rxt(114)* y(12) + het_rates(21))* y(21)
         prod(33) = (.200_r8*rxt(98)*y(17) +.400_r8*rxt(99)*y(28))*y(28)
         loss(38) = (rxt(91)* y(1) +rxt(90)* y(12) + het_rates(22))* y(22)
         prod(38) = 0._r8
         loss(27) = ( + rxt(93) + rxt(94) + het_rates(23))* y(23)
         prod(27) =rxt(92)*y(24)*y(5)
         loss(45) = (rxt(92)* y(5) + het_rates(24))* y(24)
         prod(45) =.750_r8*rxt(90)*y(22)*y(12)
         loss(50) = (rxt(113)* y(12) + het_rates(25))* y(25)
         prod(50) = (.250_r8*rxt(116)*y(33) +.200_r8*rxt(147)*y(50))*y(1) &
                  + (.250_r8*rxt(105)*y(31) +.250_r8*rxt(171)*y(57))*y(13) &
                  +.100_r8*rxt(106)*y(31)*y(17)
         loss(63) = (rxt(111)* y(12) + rxt(33) + het_rates(26))* y(26)
         prod(63) = (.530_r8*rxt(162)*y(5) +.530_r8*rxt(164)*y(7) + &
                 .260_r8*rxt(166)*y(17) +.530_r8*rxt(167)*y(31))*y(55) &
                  + (.250_r8*rxt(180)*y(5) +.250_r8*rxt(181)*y(7) + &
                 .100_r8*rxt(183)*y(17) +.250_r8*rxt(184)*y(31))*y(61) +rxt(93)*y(23)
         loss(18) = (rxt(95)* y(12) + het_rates(27))* y(27)
         prod(18) = 0._r8
         loss(71) = (rxt(96)* y(5) +rxt(97)* y(13) +rxt(98)* y(17) + 2._r8*rxt(99) &
                 * y(28) + het_rates(28))* y(28)
         prod(71) = (rxt(95)*y(27) +.500_r8*rxt(100)*y(29))*y(12) +rxt(34)*y(44)
         loss(42) = (rxt(100)* y(12) + rxt(24) + het_rates(29))* y(29)
         prod(42) =rxt(97)*y(28)*y(13)
         loss(76) = (rxt(102)* y(7) +rxt(101)* y(12) + rxt(16) + het_rates(30))* y(30)
         prod(76) = (rxt(96)*y(28) +rxt(118)*y(37) +.270_r8*rxt(122)*y(35) + &
                 rxt(136)*y(43) +rxt(138)*y(45) +.400_r8*rxt(143)*y(48))*y(5) &
                  + (.500_r8*rxt(116)*y(33) +.040_r8*rxt(159)*y(53))*y(1) &
                  + (.500_r8*rxt(100)*y(29) +rxt(114)*y(21))*y(12) &
                  + (.800_r8*rxt(98)*y(17) +1.600_r8*rxt(99)*y(28))*y(28) +rxt(24) &
                 *y(29) +rxt(17)*y(38) +rxt(38)*y(46) +.400_r8*rxt(37)*y(49)
         loss(95) = (rxt(103)* y(5) +rxt(104)* y(6) +rxt(105)* y(13) +rxt(106)* y(17) &
                  + 2._r8*rxt(110)* y(31) +rxt(153)* y(51) +rxt(167)* y(55) +rxt(184) &
                 * y(61) + het_rates(31))* y(31)
         prod(95) = (rxt(127)*y(40) +rxt(138)*y(45) +.530_r8*rxt(162)*y(55) + &
                 rxt(169)*y(57))*y(5) + (rxt(102)*y(30) +rxt(133)*y(60) + &
                 .530_r8*rxt(164)*y(55) +rxt(170)*y(57))*y(7) + (rxt(101)*y(30) + &
                 .500_r8*rxt(107)*y(32) +rxt(132)*y(60))*y(12) &
                  + (.300_r8*rxt(129)*y(40) +.260_r8*rxt(166)*y(55) +rxt(172)*y(57)) &
                 *y(17) + (.670_r8*rxt(21) +.670_r8*rxt(22))*y(54) &
                  + (.600_r8*rxt(19) +rxt(109))*y(73) +.530_r8*rxt(167)*y(55)*y(31) &
                  +rxt(27)*y(39) +rxt(26)*y(41) +rxt(34)*y(44) +rxt(38)*y(46) &
                  +.300_r8*rxt(23)*y(53) +2.000_r8*rxt(174)*y(57)*y(57) +rxt(32)*y(59) &
                  +rxt(28)*y(60) +.130_r8*rxt(35)*y(71)
         loss(49) = (rxt(107)* y(12) + rxt(18) + het_rates(32))* y(32)
         prod(49) = (.750_r8*rxt(105)*y(31) +.750_r8*rxt(171)*y(57))*y(13)
         loss(75) = (rxt(116)* y(1) +rxt(117)* y(7) +rxt(115)* y(12) + het_rates(33)) &
                 * y(33)
         prod(75) =.070_r8*rxt(147)*y(50)*y(1) +.700_r8*rxt(23)*y(53)
         loss(19) = (rxt(121)* y(12) + het_rates(34))* y(34)
         prod(19) = 0._r8
         loss(72) = (rxt(122)* y(5) +rxt(123)* y(13) +rxt(124)* y(17) + het_rates(35)) &
                 * y(35)
         prod(72) = (rxt(121)*y(34) +rxt(125)*y(36))*y(12)
         loss(40) = (rxt(125)* y(12) + rxt(25) + het_rates(36))* y(36)
         prod(40) =rxt(123)*y(35)*y(13)
         loss(67) = (rxt(118)* y(5) +rxt(119)* y(13) + het_rates(37))* y(37)
         prod(67) = (rxt(115)*y(33) +.500_r8*rxt(120)*y(38))*y(12)
         loss(52) = (rxt(120)* y(12) + rxt(17) + het_rates(38))* y(38)
         prod(52) =rxt(119)*y(37)*y(13)
         loss(68) = (rxt(126)* y(12) + rxt(27) + het_rates(39))* y(39)
         prod(68) = (.820_r8*rxt(122)*y(35) +.500_r8*rxt(136)*y(43) + &
                 .250_r8*rxt(143)*y(48) +.100_r8*rxt(196)*y(64))*y(5) &
                  +.820_r8*rxt(124)*y(35)*y(17) +.820_r8*rxt(25)*y(36) &
                  +.250_r8*rxt(37)*y(49) +.100_r8*rxt(40)*y(65)
         loss(78) = (rxt(127)* y(5) +rxt(128)* y(13) +rxt(129)* y(17) + het_rates(40)) &
                 * y(40)
         prod(78) = (rxt(126)*y(39) +rxt(130)*y(41))*y(12)
         loss(34) = (rxt(130)* y(12) + rxt(26) + het_rates(41))* y(41)
         prod(34) =rxt(128)*y(40)*y(13)
         loss(20) = (rxt(135)* y(12) + het_rates(42))* y(42)
         prod(20) = 0._r8
         loss(35) = (rxt(136)* y(5) + het_rates(43))* y(43)
         prod(35) =rxt(135)*y(42)*y(12)
         loss(21) = (rxt(142)* y(12) + het_rates(47))* y(47)
         prod(21) = 0._r8
         loss(70) = (rxt(143)* y(5) +rxt(144)* y(13) + het_rates(48))* y(48)
         prod(70) = (rxt(142)*y(47) +rxt(145)*y(49))*y(12)
         loss(65) = (rxt(145)* y(12) + rxt(37) + het_rates(49))* y(49)
         prod(65) =rxt(144)*y(48)*y(13)
         loss(51) = (rxt(137)* y(12) + rxt(34) + het_rates(44))* y(44)
         prod(51) =.750_r8*rxt(143)*y(48)*y(5) +.800_r8*rxt(37)*y(49)
         loss(66) = (rxt(138)* y(5) +rxt(139)* y(13) + het_rates(45))* y(45)
         prod(66) = (rxt(137)*y(44) +rxt(140)*y(46))*y(12)
         loss(36) = (rxt(140)* y(12) + rxt(38) + het_rates(46))* y(46)
         prod(36) =rxt(139)*y(45)*y(13)
         loss(74) = (rxt(147)* y(1) +rxt(154)* y(7) +rxt(146)* y(12) + het_rates(50)) &
                 * y(50)
         prod(74) = 0._r8
         loss(86) = (rxt(148)* y(5) +rxt(149)* y(7) +rxt(150)* y(13) +rxt(152)* y(17) &
                  +rxt(153)* y(31) + het_rates(51))* y(51)
         prod(86) = (rxt(146)*y(50) +.200_r8*rxt(151)*y(52))*y(12)
         loss(61) = (rxt(151)* y(12) + rxt(31) + het_rates(52))* y(52)
         prod(61) =rxt(150)*y(51)*y(13)
         loss(84) = (rxt(159)* y(1) +rxt(158)* y(12) + rxt(23) + het_rates(53))* y(53)
         prod(84) = (.320_r8*rxt(148)*y(5) +.350_r8*rxt(149)*y(7) + &
                 .260_r8*rxt(152)*y(17) +.350_r8*rxt(153)*y(31))*y(51) &
                  + (.039_r8*rxt(155)*y(5) +.039_r8*rxt(156)*y(7) + &
                 .039_r8*rxt(157)*y(13))*y(76) + (.200_r8*rxt(147)*y(50) + &
                 rxt(194)*y(63))*y(1) +rxt(196)*y(64)*y(5) +.402_r8*rxt(31)*y(52) &
                  +rxt(40)*y(65)
         loss(80) = (rxt(161)* y(1) +rxt(160)* y(12) + rxt(21) + rxt(22) &
                  + het_rates(54))* y(54)
         prod(80) = (.230_r8*rxt(148)*y(5) +.250_r8*rxt(149)*y(7) + &
                 .190_r8*rxt(152)*y(17) +.250_r8*rxt(153)*y(31))*y(51) &
                  + (.167_r8*rxt(155)*y(5) +.167_r8*rxt(156)*y(7) + &
                 .167_r8*rxt(157)*y(13))*y(76) + (.400_r8*rxt(147)*y(50) + &
                 rxt(194)*y(63))*y(1) +rxt(196)*y(64)*y(5) +.288_r8*rxt(31)*y(52) &
                  +rxt(40)*y(65)
         loss(85) = ((rxt(162) +rxt(163))* y(5) +rxt(164)* y(7) +rxt(165)* y(13) &
                  +rxt(166)* y(17) +rxt(167)* y(31) + het_rates(55))* y(55)
         prod(85) = (rxt(158)*y(53) +.500_r8*rxt(160)*y(54) +.200_r8*rxt(168)*y(56)) &
                 *y(12)
         loss(37) = (rxt(168)* y(12) + het_rates(56))* y(56)
         prod(37) =rxt(165)*y(55)*y(13)
         loss(87) = (rxt(169)* y(5) +rxt(175)* y(6) +rxt(170)* y(7) +rxt(171)* y(13) &
                  +rxt(172)* y(17) +rxt(173)* y(31) + 2._r8*rxt(174)* y(57) &
                  + het_rates(57))* y(57)
         prod(87) = (.330_r8*rxt(21) +.330_r8*rxt(22) +.500_r8*rxt(160)*y(12))*y(54) &
                  + (rxt(20) +rxt(176))*y(75) +.200_r8*rxt(147)*y(50)*y(1) &
                  +.500_r8*rxt(168)*y(56)*y(12)
         loss(44) = (rxt(179)* y(12) + het_rates(58))* y(58)
         prod(44) = (.370_r8*rxt(148)*y(5) +.400_r8*rxt(149)*y(7) + &
                 .300_r8*rxt(152)*y(17) +.400_r8*rxt(153)*y(31))*y(51) &
                  + (rxt(177)*y(12) +rxt(178)*y(7))*y(77)
         loss(79) = (rxt(134)* y(12) + rxt(32) + het_rates(59))* y(59)
         prod(79) = (.220_r8*rxt(162)*y(5) +.220_r8*rxt(164)*y(7) + &
                 .230_r8*rxt(166)*y(17) +.220_r8*rxt(167)*y(31))*y(55) &
                  + (.250_r8*rxt(180)*y(5) +.250_r8*rxt(181)*y(7) + &
                 .100_r8*rxt(183)*y(17) +.250_r8*rxt(184)*y(31))*y(61) &
                  + (.500_r8*rxt(120)*y(38) +.500_r8*rxt(141)*y(75))*y(12) &
                  +.200_r8*rxt(129)*y(40)*y(17)
         loss(81) = (rxt(133)* y(7) +rxt(132)* y(12) + rxt(28) + het_rates(60))* y(60)
         prod(81) = (.250_r8*rxt(162)*y(5) +.250_r8*rxt(164)*y(7) + &
                 .240_r8*rxt(166)*y(17) +.250_r8*rxt(167)*y(31))*y(55) &
                  + (.250_r8*rxt(180)*y(5) +.250_r8*rxt(181)*y(7) + &
                 .100_r8*rxt(183)*y(17) +.250_r8*rxt(184)*y(31))*y(61) &
                  + (.950_r8*rxt(159)*y(53) +.800_r8*rxt(161)*y(54))*y(1) &
                  + (rxt(131)*y(74) +rxt(134)*y(59))*y(12) +.450_r8*rxt(190)*y(68) &
                 *y(5) +.500_r8*rxt(129)*y(40)*y(17) +.450_r8*rxt(39)*y(69) &
                  +.180_r8*rxt(35)*y(71)
         loss(83) = (rxt(180)* y(5) +rxt(181)* y(7) +rxt(182)* y(13) +rxt(183)* y(17) &
                  +rxt(184)* y(31) + het_rates(61))* y(61)
         prod(83) = (.800_r8*rxt(151)*y(52) +rxt(179)*y(58) +rxt(185)*y(62))*y(12)
         loss(28) = ((rxt(185) +rxt(186))* y(12) + rxt(29) + het_rates(62))* y(62)
         prod(28) =rxt(182)*y(61)*y(13)
         loss(64) = (rxt(194)* y(1) +rxt(195)* y(7) +rxt(193)* y(12) + het_rates(63)) &
                 * y(63)
         prod(64) = 0._r8
         loss(77) = (rxt(196)* y(5) +rxt(197)* y(13) + het_rates(64))* y(64)
         prod(77) = (rxt(193)*y(63) +rxt(198)*y(65))*y(12) +rxt(195)*y(63)*y(7)
         loss(53) = (rxt(198)* y(12) + rxt(40) + het_rates(65))* y(65)
         prod(53) =rxt(197)*y(64)*y(13)
         loss(23) = (rxt(187)* y(12) + het_rates(66))* y(66)
         prod(23) = 0._r8
         loss(24) = (rxt(188)* y(12) + het_rates(67))* y(67)
         prod(24) =.250_r8*rxt(187)*y(66)*y(12)
         loss(55) = (rxt(190)* y(5) +rxt(191)* y(13) + het_rates(68))* y(68)
         prod(55) = (.700_r8*rxt(187)*y(66) +rxt(192)*y(69))*y(12)
         loss(46) = (rxt(192)* y(12) + rxt(39) + het_rates(69))* y(69)
         prod(46) =rxt(191)*y(68)*y(13)
         loss(29) = (rxt(189)* y(6) + het_rates(70))* y(70)
         prod(29) =rxt(188)*y(67)*y(12)
         loss(56) = ( + rxt(35) + het_rates(71))* y(71)
         prod(56) =.900_r8*rxt(190)*y(68)*y(5) +.700_r8*rxt(189)*y(70)*y(6) &
                  +.900_r8*rxt(39)*y(69)
         loss(54) = (rxt(112)* y(12) + rxt(36) + het_rates(72))* y(72)
         prod(54) = (.250_r8*rxt(180)*y(5) +.250_r8*rxt(181)*y(7) + &
                 .100_r8*rxt(183)*y(17))*y(61) + (.650_r8*rxt(89)*y(101) + &
                 .200_r8*rxt(111)*y(26))*y(12) +.450_r8*rxt(190)*y(68)*y(5) &
                  +.450_r8*rxt(39)*y(69) +.130_r8*rxt(35)*y(71)
         loss(57) = (rxt(108)* y(12) + rxt(19) + rxt(109) + het_rates(73))* y(73)
         prod(57) =rxt(104)*y(31)*y(6)
         loss(47) = (rxt(131)* y(12) + het_rates(74))* y(74)
         prod(47) =.100_r8*rxt(143)*y(48)*y(5) +rxt(117)*y(33)*y(7)
         loss(60) = (rxt(141)* y(12) + rxt(20) + rxt(176) + het_rates(75))* y(75)
         prod(60) =rxt(175)*y(57)*y(6)
         loss(69) = (rxt(155)* y(5) +rxt(156)* y(7) +rxt(157)* y(13) + het_rates(76)) &
                 * y(76)
         prod(69) =rxt(154)*y(50)*y(7)
         loss(73) = (rxt(178)* y(7) +rxt(177)* y(12) + rxt(30) + het_rates(77))* y(77)
         prod(73) = (.080_r8*rxt(148)*y(51) +.794_r8*rxt(155)*y(76) + &
                 .800_r8*rxt(163)*y(55))*y(5) + (.794_r8*rxt(156)*y(7) + &
                 .794_r8*rxt(157)*y(13))*y(76)
         loss(22) = (rxt(204)* y(12) + het_rates(83))* y(83)
         prod(22) = (rxt(205)*y(12) +.500_r8*rxt(206)*y(12) +rxt(207)*y(7))*y(84)
         loss(32) = (rxt(207)* y(7) + (rxt(205) +rxt(206))* y(12) + het_rates(84)) &
                 * y(84)
         prod(32) = 0._r8
         loss(1) = ( + het_rates(85))* y(85)
         prod(1) =rxt(204)*y(83)*y(12)
         loss(17) = (rxt(208)* y(12) + het_rates(86))* y(86)
         prod(17) = 0._r8
         loss(2) = ( + het_rates(87))* y(87)
         prod(2) = 0._r8
         loss(3) = ( + het_rates(88))* y(88)
         prod(3) = 0._r8
         loss(4) = ( + het_rates(82))* y(82)
         prod(4) = 0._r8
         loss(5) = ( + rxt(203) + het_rates(78))* y(78)
         prod(5) = 0._r8
         loss(6) = ( + het_rates(79))* y(79)
         prod(6) =rxt(203)*y(78)
         loss(7) = ( + rxt(209) + het_rates(80))* y(80)
         prod(7) = 0._r8
         loss(8) = ( + het_rates(81))* y(81)
         prod(8) =rxt(209)*y(80)
         loss(25) = (rxt(89)* y(12) + het_rates(101))* y(101)
         prod(25) = 0._r8
         loss(39) = (rxt(84)* y(12) + het_rates(102))* y(102)
         prod(39) = (rxt(87)*y(5) +rxt(88)*y(13))*y(103) +.500_r8*rxt(91)*y(22)*y(1) &
                  +.350_r8*rxt(89)*y(101)*y(12)
         loss(48) = (rxt(87)* y(5) +rxt(88)* y(13) + rxt(86) + het_rates(103))* y(103)
         prod(48) =rxt(85)*y(19)*y(13)
         loss(9) = ( + het_rates(89))* y(89)
         prod(9) = 0._r8
         loss(10) = ( + het_rates(90))* y(90)
         prod(10) = 0._r8
         loss(11) = ( + het_rates(91))* y(91)
         prod(11) = 0._r8
         loss(12) = ( + het_rates(92))* y(92)
         prod(12) = 0._r8
         loss(13) = ( + het_rates(93))* y(93)
         prod(13) = 0._r8
         loss(14) = ( + het_rates(94))* y(94)
         prod(14) = 0._r8
         loss(15) = ( + het_rates(95))* y(95)
         prod(15) = 0._r8
         loss(16) = ( + het_rates(96))* y(96)
         prod(16) = 0._r8
      end subroutine imp_prod_loss
      end module mo_prod_loss
